<?php
echo $header;
echo $sidebar
?>	
<style>
	.row-fluid .span5{ width: 12.171%;}
	
</style>	
<div class="span10 content">
    <?php echo $hugemenu ?>

    <?php if ($this->session->flashdata('message')) { ?>
        <div class="alert alert-success">
            <?php echo $this->session->flashdata('message') ?>
        </div>
    <?php } ?>
		<table id="table_report" class="table table-striped table-bordered table-hover">
			<thead>
				
				<tr>
					<th>Subscriber Name</th>
					<th>Subscriber Email</th>
					<th>Date Created</th>
					<th>Options</th>
				</tr>
			</thead>
									
			<tbody>
				<?php
				if (!empty($subscribers)) { ?>
				<?php
				foreach ($subscribers as $key => $user) { ?>
				
				<tr>
					<td><?php echo $user['sub_name']?></td>
					<td><?php echo $user['sub_email']?></td>
					<td><?php echo $user['sub_date']?></td>
					<td align="right">
						<div class='btn-group'>
							<a href='<?php echo site_url()?>/news/sub/edit_sub/<?php echo $user['sub_id']?>'>
							<button class='btn btn-mini btn-inverse'><i class='icon-edit'></i>Edit</button>
							</a>
	<a href='<?php echo site_url()?>/news/delete_sub/<?php echo $user['sub_id']?>'>
							<button class='btn btn-mini btn-purple'><i class='icon-trash'></i>Delete</button>
							</a>
						</div>
					</td>
				</tr>
					<?php
				}
				?>
				
				<?php }else{?>
				<tr>
                	<td colspan="4">No data available in table</td>
                </tr>
				<?php }
				?>
				
			</tbody>
		</table><br />

		<a href='<?php echo site_url()?>/news/sub/add_sub'>
		<button class="btn btn-success span5"><i class='icon-pushpin'></i>Add Subscriber</button>
		</a>&nbsp;&nbsp;
		<a href='<?php echo site_url()?>/news/export_csv'>
		<button class="btn btn-medium btn-danger"><i class='icon-exchange'></i>Export CSV</button>
		</a>

</div><!--/content-->

<?php echo $footer ?>